package hanlp;

import com.hankcs.hanlp.dictionary.CoreSynonymDictionary;

/**
 * Created by zhoub on 2020/8/4.
 */
public class DemoWordDistance {

    public static void main(String[] args)
    {



        String a = "3A4怎么修";
        String b = "维修";

        System.out.println(a + "\t" + b + "\t之间的距离是\t" + CoreSynonymDictionary.distance(a, b) + "\t"+ CoreSynonymDictionary.similarity(a, b));

        /*String[] wordArray = new String[]
                {
                        "香蕉",
                        "苹果",
                        "白菜",
                        "水果",
                        "蔬菜",
                        "自行车",
                        "公交车",
                        "飞机",
                        "买",
                        "卖",
                        "购入",
                        "新年",
                        "春节",
                        "丢失",
                        "补办",
                        "办理",
                        "送给",
                        "寻找",
                        "孩子",
                        "教室",
                        "教师",
                        "会计",
                };
        for (String a : wordArray)
        {
            for (String b : wordArray)
            {

                System.out.println(a + "\t" + b + "\t之间的距离是\t" + CoreSynonymDictionary.distance(a, b));
                System.out.println(a + "\t" + b + "\t之间的距离是\t" + CoreSynonymDictionary.similarity(a, b));
            }
        }*/
    }
}
